/**
 * Author: Wang Haitao
 * Date: 2024-xx-xx
 * Description: 这个文件关于INA22x的报警IO，目前使用查询的方式，对响应速度有要求可以增加外部中断的方式
 * Code Copy：拷贝代码，请加上作者信息。
 */
#ifndef __INA22X_ALERT_IO_H__
#define __INA22X_ALERT_IO_H__

#include <stdint.h>
#include "../../BSP/GPIO_BSP/gpio_bsp.h"


#define Alert_COUNT     16

#define Alert0_Port     PortB
#define Alert0_Pin      Pin15

#define Alert1_Port     PortB
#define Alert1_Pin      Pin15

#define Alert2_Port     PortB
#define Alert2_Pin      Pin15

#define Alert3_Port     PortB
#define Alert3_Pin      Pin15

#define Alert4_Port     PortB
#define Alert4_Pin      Pin15

#define Alert5_Port     PortB
#define Alert5_Pin      Pin15

#define Alert6_Port     PortB
#define Alert6_Pin      Pin15

#define Alert7_Port     PortB
#define Alert7_Pin      Pin15

#define Alert8_Port     PortB
#define Alert8_Pin      Pin15

#define Alert9_Port     PortB
#define Alert9_Pin      Pin15

#define Alert10_Port    PortB
#define Alert10_Pin     Pin15

#define Alert11_Port    PortB
#define Alert11_Pin     Pin15

#define Alert12_Port    PortB
#define Alert12_Pin     Pin15

#define Alert13_Port    PortB
#define Alert13_Pin     Pin15

#define Alert14_Port    PortB
#define Alert14_Pin     Pin15

#define Alert15_Port    PortB
#define Alert15_Pin     Pin15

typedef enum
{
    Alert_Open = Low,
    Alert_Close= Hig,
}WHT_INA22x_Alert_enum;

typedef struct
{
    void (*WHT_Init)(void);
    WHT_INA22x_Alert_enum (*WHT_Get_Alert_Status)(uint8_t number);
    uint16_t (*WHT_Get_All_Alert_Status)(void);
}WHT_INA22x_Alert_Status_t;

extern const WHT_INA22x_Alert_Status_t WHT_INA22x_Alert_Status;

#endif /* __INA22X_ALERT_IO_H__ */
